package com.franklin.java.api.find;

import com.intellij.find.findUsages.FindUsagesOptions;
import com.intellij.psi.PsiElement;
import com.intellij.usages.UsageInfoToUsageConverter;
import org.jetbrains.annotations.NotNull;

final class LastSearchData {

  private final UsageInfoToUsageConverter.TargetElementsDescriptor myDescriptor;
  private final FindUsagesOptions myOptions;

  LastSearchData(@NotNull PsiElement[] primaryElements,
                 @NotNull PsiElement[] secondaryElements,
                 @NotNull FindUsagesOptions options) {
    myDescriptor = new UsageInfoToUsageConverter.TargetElementsDescriptor(primaryElements, secondaryElements);
    myOptions = options;
  }

  @NotNull PsiElement[] getPrimaryElements() {
    return myDescriptor.getPrimaryElements();
  }

  @NotNull PsiElement[] getSecondaryElements() {
    return myDescriptor.getAdditionalElements();
  }

  @NotNull FindUsagesOptions getOptions() {
    return myOptions;
  }
}
